using System;
using System.Collections.Generic;
using System.Text;

namespace MyAI.NeuralNetworkLib.Utils
{
    public class Randomizer
    {
        #region Vars
        private static Randomizer _instance = null;
        private Random _r;
        #endregion

        #region Constructor
        private Randomizer()
        {
            _r = new Random();
        }
        #endregion

        #region Instance
        public static Randomizer Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new Randomizer();
                }
                return _instance;
            }
        }
        #endregion

        #region Nextdouble
        public double Nextdouble()
        {
            return _r.NextDouble();
        }
        #endregion
    }
}
